<?php

use App\Http\Controllers\Api\Payment\NotifyController;
use App\Http\Controllers\Api\Payment\OrderController;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "api" middleware group. Make something great!
|
*/
//Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
//    return $request->user();
//});

// 支付模块
Route::prefix('payment')->group(function () {

    //订单
    Route::prefix('order')->group(function () {
        Route::post('/create', [OrderController::class,'create']);// 创建订单
        Route::get('/getPayStatus', [OrderController::class,'getPayStatus']);// 获取支付状态（实时）
        Route::post('/refund', [OrderController::class,'refund']);// 退款
        Route::post('/close', [OrderController::class,'close']);// 关闭订单
    });

});

